package com.wangdao.wechatmall.controller.wx;

import com.wangdao.wechatmall.bean.vo.admin.BaseRespVo;
import com.wangdao.wechatmall.bean.vo.wx.HomeIndexVO;
import com.wangdao.wechatmall.service.wx.WXHomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author: JK
 * @Date: create in 2021/7/11 15:04
 */
@RestController
@RequestMapping("wx/home")
public class WXHomeController {
    @Autowired
    WXHomeService wxHomeService;

    /**
     * 显示商城主页
     * @return
     */
    @RequestMapping("index")
    public BaseRespVo index() {
        HomeIndexVO homeIndexVO = wxHomeService.showHome();
        return BaseRespVo.ok(homeIndexVO);
    }
}
